#include <memory>
#include "../../source/mail.h"
#include "../../source/log.h"


int main()
{
    bitelog::bitelog_init();
    // 1. 构造邮件服务配置
    bitecode::mail_settings settings = {
        .username = "18843511697@163.com",
        .password = "YYicPq7PiGZNtUnx",
        .url = "smtps://smtp.163.com:465",
        .from = "18843511697@163.com",
    };
    // 2. 实例化邮件客户端对象
    auto mail = std::make_unique<bitecode::MailClient>(settings);
    // 3. 发送邮件
    bool ret = mail->send("18843511697@163.com", "6789");
    if (!ret) {
        std::cout << "发送邮件失败！" << std::endl;
    }
    return 0;
}